#!/bin/bash

while :; do ps axj | head -1 && ps axj | grep $1 | grep -v grep;sleep $2; done